<template>
  <div class="backtop" @click="backTop">
    <img src="~assets/images/icon/up.png" alt="" />
  </div>
</template>

<script>
export default {
  name: 'BackTop',
  setup(_, { emit }) {
    function backTop() {
      emit('backTop')
    }
    return {
      backTop
    }
  }
}
</script>

<style lang="scss" scoped>
.backtop {
  height: 0.3rem;
  width: 0.3rem;
  position: fixed;
  bottom: 0.6rem;
  right: 0.1rem;
  border-radius: 50%;
  box-sizing: content-box;
  padding: 0.02rem;
  border: 0.02rem solid #eee;
  overflow: hidden;
  img {
    height: 100%;
    width: 100%;
  }
}
</style>